<div class="phicdcbs index">
<?php
if(!empty($rows)&&!empty($cols)&&!empty($data))
	echo $ctable->thu_chi($rows, $cols, $data);?>
<br>

	<h2><?php __('Các Hoạt Động Thu - Chi');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('STT');?></th>
			<th><?php echo $this->Paginator->sort('Loại Phí');?></th>
			<!--<th><?php //echo $this->Paginator->sort('Chi Đoàn');?></th>-->
			<th><?php echo $this->Paginator->sort('Ngày Thu(Chi)');?></th>
			<th><?php echo $this->Paginator->sort('Số Tiền');?></th>
			<th><?php echo $this->Paginator->sort('Lý Do');?></th>
			<th><?php echo $this->Paginator->sort('Người Nhận');?></th>
			<th><?php echo $this->Paginator->sort('Ghi Chú');?></th>
			<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($phicdcbs as $phicdcb):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $i; ?>&nbsp;</td>
		<td>
			<?php echo $this->Html->link($phicdcb['Loaichiphi']['tenloaichiphi'], array('controller' => 'loaichiphis', 'action' => 'view', $phicdcb['Loaichiphi']['id'])); ?>
		</td>
		<!--<td>
			<?php //echo $this->Html->link($phicdcb['Chidoansv']['id'], array('controller' => 'chidoansvs', 'action' => 'view', $phicdcb['Chidoansv']['id'])); ?>
		</td>-->
		<td><?php echo date('d-m-Y',strtotime($phicdcb['Phicdcb']['ngaynop'])); ?>&nbsp;</td>
		<td><?php echo number_format($phicdcb['Phicdcb']['sotien']); ?>&nbsp;</td>
		<td><?php echo $phicdcb['Phicdcb']['lydo']; ?>&nbsp;</td>
		<td><?php echo $phicdcb['Phicdcb']['nguoinhan']; ?>&nbsp;</td>
		<td><?php echo $phicdcb['Phicdcb']['ghichu']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('View', true), array('action' => 'view', $phicdcb['Phicdcb']['id'])); ?>
			<?php echo $this->Html->link(__('Edit', true), array('action' => 'edit', $phicdcb['Phicdcb']['chidoansv_id'], $phicdcb['Phicdcb']['id'])); ?>
			<?php echo $this->Html->link(__('Delete', true), array('action' => 'delete', $phicdcb['Phicdcb']['chidoansv_id'],$phicdcb['Phicdcb']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $phicdcb['Phicdcb']['id'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% mẫu tin', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('New Phicdcb', true), array('action' => 'add',$chidoansv_id)); ?></li>
		<li><?php echo $this->Html->link(__('List Loaichiphis', true), array('controller' => 'loaichiphis', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Loaichiphi', true), array('controller' => 'loaichiphis', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Chidoansvs', true), array('controller' => 'chidoansvs', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Chidoansv', true), array('controller' => 'chidoansvs', 'action' => 'add')); ?> </li>
	</ul>
</div>